﻿<MenuItem 
    x:Class="TfsWorkbench.TaskBoardUI.MenuControl"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:UIElements="clr-namespace:TfsWorkbench.UIElements;assembly=TfsWorkbench.UIElements"
    xmlns:Properties="clr-namespace:TfsWorkbench.TaskBoardUI.Properties" 
    Header="{Binding Source={x:Static Properties:Settings.Default}, Path=ModeName}"
    Name="PART_TaskboardMenu"
    >
    <MenuItem.Resources>
        <ResourceDictionary>
            <ResourceDictionary.MergedDictionaries>
                <ResourceDictionary Source="/TfsWorkbench.UIElements;Component/Resources/ApplicationStyles.xaml"/>
                <ResourceDictionary Source="/TfsWorkbench.UIElements;Component/Resources/CommandButtonStyles.xaml"/>
            </ResourceDictionary.MergedDictionaries>
        </ResourceDictionary>
    </MenuItem.Resources>
    <MenuItem 
        Header="{x:Static Properties:Resources.String001}"
        Command="{x:Static UIElements:CommandLibrary.ShowDisplayModeCommand}" 
        CommandTarget="{Binding RelativeSource={RelativeSource AncestorType={x:Type UserControl}}}" 
        CommandParameter="{Binding ElementName=PART_TaskboardMenu, Path=DisplayMode}"
        >
        <MenuItem.Icon>
			<ContentControl Template="{StaticResource BringToFrontIconTemplate}" Style="{StaticResource MenuIconStyle}" />
		</MenuItem.Icon>
	</MenuItem>
    <MenuItem
        Header="Use Smooth Scrolling"
        IsCheckable="True"
        IsChecked="{Binding Source={x:Static Properties:Settings.Default}, Path=UseSmoothScrolling, Mode=TwoWay}"
        />
    <MenuItem 
        Name="PART_CardSizeSelector"
        Header="{x:Static Properties:Resources.String002}">
        <MenuItem 
            Name="PART_ExtraLarge"
            Header="{x:Static Properties:Resources.String004}" 
            Click="ChangeTaskCardSize" 
            IsCheckable="True"
            />
        <MenuItem 
            Name="PART_Large"
            Header="{x:Static Properties:Resources.String005}" 
            Click="ChangeTaskCardSize" 
            IsCheckable="True"
            />
        <MenuItem 
            Name="PART_Medium"
            Header="{x:Static Properties:Resources.String006}" 
            Click="ChangeTaskCardSize" 
            IsCheckable="True"
            />
        <MenuItem 
            Name="PART_Small"
            Header="{x:Static Properties:Resources.String007}" 
            Click="ChangeTaskCardSize" 
            IsCheckable="True"
            />
        <MenuItem.Icon>
            <ContentControl Template="{StaticResource EditIconTemplate}" Style="{StaticResource MenuIconStyle}" />
        </MenuItem.Icon>
    </MenuItem>
    <Separator />
    <MenuItem 
        Header="{x:Static Properties:Resources.String003}"
        Command="{x:Static UIElements:CommandLibrary.SystemShellCommand}" 
        CommandTarget="{Binding RelativeSource={RelativeSource AncestorType={x:Type UserControl}}}" 
        CommandParameter="{Binding Source={x:Static Properties:Settings.Default}, Path=HelpPageUrl}"
        >
        <MenuItem.Icon>
            <ContentControl Template="{StaticResource QuestionIconTemplate}" Style="{StaticResource MenuIconStyle}" />
        </MenuItem.Icon>
    </MenuItem>
</MenuItem>
